﻿using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using DevExpress.XtraReports.UI;
using System.Collections.Generic;
using FlyHorse.LIMS.WinApp.Model;

namespace FlyHorse.LIMS.WinApp.XtraReportTemplate
{
    public partial class XtraReportMix : DevExpress.XtraReports.UI.XtraReport
    {
        public XtraReportMix(List<ReportMixModel> reportList)
        {
            InitializeComponent();
            InitReport(reportList);
        }


        private void InitReport(List<ReportMixModel> reportList)
        {
            //reportList = reportList.OrderBy(m => m.SendDate).ToList();

            // TransformSemiReport transformSemiReport = new TransformSemiReport();
            this.DataSource = reportList;

            xrTableCell_DataTime.DataBindings.Add("Text", null, "ProduceDate");
            xrTableCell_SamplePlace.DataBindings.Add("Text", null, "SamplingPlaceName");
            xrTableCell_GoodsName.DataBindings.Add("Text", null, "GoodsName");


            xrTableCell_IA.DataBindings.Add("Text", null, "IA");
            xrTableCell_DBP.DataBindings.Add("Text", null, "DBP");
            xrTableCell_IPHavg.DataBindings.Add("Text", null, "IPH_AVG");
            xrTableCell_IPHhigh.DataBindings.Add("Text", null, "IPH_High");
            xrTableCell_IPHlow.DataBindings.Add("Text", null, "IPH_Low");
            xrTableCell_Fines.DataBindings.Add("Text", null, "Fines");
            xrTableCell_HL.DataBindings.Add("Text", null, "HL");
            xrTableCell_Sieve35.DataBindings.Add("Text", null, "Sieve35");
            xrTableCell_Sieve100.DataBindings.Add("Text", null, "Sieve100");
            xrTableCell_Sieve325.DataBindings.Add("Text", null, "Sieve325");
            xrTableCell_LT.DataBindings.Add("Text", null, "LT");
            xrTableCell_PD.DataBindings.Add("Text", null, "PD");
            xrTableCell_PH.DataBindings.Add("Text", null, "PH");
            xrTableCell_PSD10.DataBindings.Add("Text", null, "PSD10");
            xrTableCell_PSD18.DataBindings.Add("Text", null, "PSD18");
            xrTableCell_PSD35.DataBindings.Add("Text", null, "PSD35");
            xrTableCell_PSD60.DataBindings.Add("Text", null, "PSD60");
            xrTableCellPSD120.DataBindings.Add("Text", null, "PSD120");
            xrTableCell_PSDpan.DataBindings.Add("Text", null, "PSDpan");
            xrTableCellTint.DataBindings.Add("Text", null, "Tint");
            xrTableCellCDBP.DataBindings.Add("Text", null, "CDBP");
            xrTableCellN2sa.DataBindings.Add("Text", null, "N2SA");
            xrTableCell_Ash.DataBindings.Add("Text", null, "Ash");


            //xrTableCell_TestItemName.DataBindings.Add("Text", null, "ChineseName");
            //xrTableCell_Basis.DataBindings.Add("Text", null, "Basis");
            //xrTableCell_Unit.DataBindings.Add("Text", null, "Unit");
            //xrTableCell_MinValue.DataBindings.Add("Text", null, "MinValue");
            //xrTableCell_MaxValue.DataBindings.Add("Text", null, "MaxValue");
            //xrTableCell_TestValue.DataBindings.Add("Text", null, "TestValue");
            //xrTableCell_Conclusion.DataBindings.Add("Text", null, "Conclusion");

        }

    }
}
